﻿
@{
    ViewData["Title"] = "LockScreen";
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>AdminLTE 2 | Lockscreen</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="~/components/bootstrap/dist/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="~/components/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="~/components/Ionicons/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="~/css/AdminLTE.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!-- Google Font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition lockscreen">
    <!-- Automatic element centering -->
    <div class="lockscreen-wrapper">
        <div class="lockscreen-logo">
            <a href="https://github.com/VictorTzeng/Zxw.Framework.NetCore" target="_blank"><b>Zxw.Framework.NetCore</b></a>
        </div>
        <!-- User name -->
        <div class="lockscreen-name">@User.Identity.Name</div>

        <!-- START LOCK SCREEN ITEM -->
        <div class="lockscreen-item">
            <!-- lockscreen image -->
            <div class="lockscreen-image">
                <img src="https://avatars0.githubusercontent.com/u/7413525?s=400&u=eace68b7a452067f171bf43d02da090d8fd33f97&v=4" alt="User Image">
            </div>
            <!-- /.lockscreen-image -->
            <!-- lockscreen credentials (contains the form) -->
            <form class="lockscreen-credentials" role="form" action="@Url.Action("Unlock")" method="post" id="login-form">
                @Html.AntiForgeryToken()
                <div class="input-group">
                    <input type="password" class="form-control" placeholder="password" name="password" required/>

                    <div class="input-group-btn">
                        <button type="submit" class="btn"><i class="fa fa-arrow-right text-muted"></i></button>
                    </div>
                </div>
            </form>
            <!-- /.lockscreen credentials -->

        </div>
        <!-- /.lockscreen-item -->
        <div class="help-block text-center">
            Enter your password to retrieve your session
        </div>
        <div class="text-center">
            <a href="@Url.Action("Index")">Or sign in as a different user</a>
        </div>
        <div class="lockscreen-footer text-center">
            Copyright &copy; @DateTime.Now.Year <b><a href="mailto:victor.tzeng@outlook.com" class="text-black">曾祥旺</a></b>&nbsp;All rights reserved.
        </div>
    </div>
    <!-- /.center -->
    <!-- jQuery 3 -->
    <script src="~/components/jquery/dist/jquery.min.js"></script>
<script src="~/lib/layer/layer.js"></script>
    <!-- Bootstrap 3.3.7 -->
    <script src="~/components/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- jquery.form.js -->
<script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#login-form").ajaxForm({
            //dataType: "json",
            //beforeSubmit: function() {
            //    return true;
            //},
            success: function(rep) {
                if (rep.success == true) {
                    layer.msg("元气满满，欢迎回来 ~",
                        function() {
                            parent.layer.closeAll();
                        });
                } else {
                    layer.alert("密码错误，请重试...", { icon: 5 });
                }
            },
            error: function() {
                layer.alert("网络开小差啦，请稍候再试", { icon: 5 });
            }
        });
    });
</script>
</body>
</html>

